import Vue from 'vue'
import VueRouter from 'vue-router'
//import { component } from 'vue/types/umd'

const home = () => import('../views/home/home.vue')
const kf = () => import('../views/kf/kf.vue')
const gy = () => import('../views/gy/gy.vue')
const me = () => import('../views/me/me.vue')
const detail = () =>import('../views/detail/detail.vue')


Vue.use(VueRouter)

const routes =[
  {
    path:'/',
    redirect:'home'
  },
  {
    path:'/home',
    component:home
  },
  {
   path:'/s2',
   component:gy
 },
 {
   path:'/s3',
   component:kf
 },
 {
   path:'/s4',
   component:me
 },
 {
   path:'/detail/:id',
   component:detail
 }
]

const router = new VueRouter({
  routes,
  mode:"history"
})

export default router
